package com.qunar.support.web;

import java.io.PrintWriter;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.qunar.support.service.ApplyService;
import com.qunar.support.util.IntegerUtils;

/**
 * 统计记录总条数
 * 
 * @author jinye.liu
 * 
 */
public class GetVendorApplyNumServlet extends HttpServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8359768218368242702L;

	public void service(HttpServletRequest request, HttpServletResponse response) {
		try {
			ApplyService as = new ApplyService();

			response.setCharacterEncoding("utf8");
			PrintWriter out = response.getWriter();

			String uid0 = request.getParameter("uid");
			int uid = IntegerUtils.valueOf(uid0);
			String filter0 = request.getParameter("filter");
			int filter = IntegerUtils.valueOf(filter0);

			out.println(as.getVendorApplyNum(uid, filter));
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
